{% extends 'page_framework.html' %}

{% block css %}
    <style>
        .table > tbody > tr > td {padding:2px;}
    </style>
{% endblock %}

{% block body %}
    <div class="row" style="padding:0 3%">
        <div class="ibox float-e-margins">
            <div class="ibox-content">
                <table class="table table-bordered">
                    <thead>
                        <tr style="padding: 2px">
                            <th style="text-align: center">序号</th>
                            <th style="text-align: center">状态</th>
                            <th style="text-align: center">上报时间</th>
                            <th style="text-align: center">主IP</th>
                            <th style="text-align: center">主机名</th>
                            <th style="text-align: center">制造商</th>
                            <th style="text-align: center">总内存</th>
                            <th style="text-align: center">可用内存</th>
                            <th style="text-align: center">总硬盘(G)</th>
                            <th style="text-align: center">类型</th>
                            <th style="text-align: center">型号</th>
                            <th style="text-align: center">系统</th>
                            <th style="text-align: center">内核</th>
                            <th style="text-align: center">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        {% for item in pageData %}
                            <tr style="text-align: center;height: 25px">
                                <td style="display: none" id="td_id">{{ item.id }}</td>
                                <td id="td_num"></td>
                                <td id="td_statu"></td>
                                <td id="td_reportTime">{{ item.reportTime | date:"Y-m-d H:i:s" }}</td>
                                <td id="td_main_ip">{{ item.main_ip }}</td>
                                <td id="td_hostname">{{ item.hostname }}</td>
                                <td id="td_vendor">{{ item.platform.vendor }}</td>
                                <td id="td_memory_total_size">{{ item.memory_total_size }}</td>
                                <td id="td_memory_free_size">{{ item.memory_free_size }}</td>
                                <td id="td_disk_total_size">{{ item.disk_total_size }}</td>
                                <td id="td_virturl">{{ item.platform.virtual }}</td>
                                <td id="td_model">{{ item.platform.model }}</td>
                                <td id="td_os">{{ item.platform.os }}</td>
                                <td id="td_kernel">{{ item.platform.kernel }}</td>
                                <td>
                                    <a style="height: 20px;font-size: 8px;padding-top: 2px;padding-bottom: 1px" class="btn btn-info" onclick="details(this)">详情</a>
                                </td>
                            </tr>
                        {% endfor %}
                    </tbody>
                </table>
            </div>
        </div>
    </div>

{% endblock %}

{% block js %}
    <script src="../../static/js/assets/server.js"></script>
{% endblock %}